﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhaoxiLearningWpf.Common;
using ZhaoxiLearningWpf.Model;

namespace ZhaoxiLearningWpf.ViewModel
{
    public class GuabaoViewModel
    {
        public ObservableCollection<GuabaoModel> CategoryCourse { get; set; }

        public ObservableCollection<GuabaoModel> CategoryTeachers { get; set; }

        public ObservableCollection<GuabaoModel> CategoryTypes { get; set; }

        public CommandBase OpenUrlCommand { get; set; }
        public GuabaoViewModel()
        {
            OpenUrlCommand = new CommandBase();
            OpenUrlCommand.DoCanExecute = (o) => true;
            OpenUrlCommand.DoExecute = (o) => {
                System.Diagnostics.Process.Start(o.ToString());
            };

            CategoryCourse = new ObservableCollection<GuabaoModel>();
            CategoryTeachers = new ObservableCollection<GuabaoModel>();
            CategoryTypes = new ObservableCollection<GuabaoModel>();

            CategoryCourse.Add(new GuabaoModel("全部", true));
            CategoryCourse.Add(new GuabaoModel("C#"));
            CategoryCourse.Add(new GuabaoModel("Java"));
            CategoryCourse.Add(new GuabaoModel("C++"));

            CategoryTeachers.Add(new GuabaoModel("Eleven", true));
            CategoryTeachers.Add(new GuabaoModel("Richard"));
            CategoryTeachers.Add(new GuabaoModel("Mike"));
            CategoryTeachers.Add(new GuabaoModel("John"));

            CategoryTypes.Add(new GuabaoModel("布偶", true));
            CategoryTypes.Add(new GuabaoModel("英短"));
            CategoryTypes.Add(new GuabaoModel("田园"));

        }
    }
}
